package com.hzit.bj1804.dian.entity;

import java.io.Serializable;

/**
 * PRODUCTCATEGORY
 * @author 
 */
public class Productcategory implements Serializable {
    //类别ID
    private Integer categoryid;
    //类别名称
    private String categoryname;
    //类别级别
    private String categorylevel;
    //类别父类ID
    private Integer parentid;
    //是否主页显示
    private String show;
    //显示序号
    private Integer shownumber;
    //类别广告
    private String adverpic;
    //状态
    private Short status;
    //网站地址
    private Integer url;

    private static final long serialVersionUID = 1L;

    public Integer getCategoryid() {
        return categoryid;
    }

    public void setCategoryid(Integer categoryid) {
        this.categoryid = categoryid;
    }

    public String getCategoryname() {
        return categoryname;
    }

    public void setCategoryname(String categoryname) {
        this.categoryname = categoryname;
    }

    public String getCategorylevel() {
        return categorylevel;
    }

    public void setCategorylevel(String categorylevel) {
        this.categorylevel = categorylevel;
    }

    public Integer getParentid() {
        return parentid;
    }

    public void setParentid(Integer parentid) {
        this.parentid = parentid;
    }

    public String getShow() {
        return show;
    }

    public void setShow(String show) {
        this.show = show;
    }

    public Integer getShownumber() {
        return shownumber;
    }

    public void setShownumber(Integer shownumber) {
        this.shownumber = shownumber;
    }

    public String getAdverpic() {
        return adverpic;
    }

    public void setAdverpic(String adverpic) {
        this.adverpic = adverpic;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public Integer getUrl() {
        return url;
    }

    public void setUrl(Integer url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Productcategory other = (Productcategory) that;
        return (this.getCategoryid() == null ? other.getCategoryid() == null : this.getCategoryid().equals(other.getCategoryid()))
            && (this.getCategoryname() == null ? other.getCategoryname() == null : this.getCategoryname().equals(other.getCategoryname()))
            && (this.getCategorylevel() == null ? other.getCategorylevel() == null : this.getCategorylevel().equals(other.getCategorylevel()))
            && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid()))
            && (this.getShow() == null ? other.getShow() == null : this.getShow().equals(other.getShow()))
            && (this.getShownumber() == null ? other.getShownumber() == null : this.getShownumber().equals(other.getShownumber()))
            && (this.getAdverpic() == null ? other.getAdverpic() == null : this.getAdverpic().equals(other.getAdverpic()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            &&(this.getUrl()==null?other.getUrl()==null:this.getUrl().equals(other.getUrl()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCategoryid() == null) ? 0 : getCategoryid().hashCode());
        result = prime * result + ((getCategoryname() == null) ? 0 : getCategoryname().hashCode());
        result = prime * result + ((getCategorylevel() == null) ? 0 : getCategorylevel().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getShow() == null) ? 0 : getShow().hashCode());
        result = prime * result + ((getShownumber() == null) ? 0 : getShownumber().hashCode());
        result = prime * result + ((getAdverpic() == null) ? 0 : getAdverpic().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result=prime*result+((getUrl()==null)?0:getUrl().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", categoryid=").append(categoryid);
        sb.append(", categoryname=").append(categoryname);
        sb.append(", categorylevel=").append(categorylevel);
        sb.append(", parentid=").append(parentid);
        sb.append(", show=").append(show);
        sb.append(", shownumber=").append(shownumber);
        sb.append(", adverpic=").append(adverpic);
        sb.append(", status=").append(status);
        sb.append(",url=").append(url);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}